'use strict';
// 查询icon
const db = uniCloud.database();
const collection = db.collection('iconImg');
const $ = db.command.aggregate;
const dbCmd = db.command
exports.main = async (event, context) => {
	console.log('event', event)
	console.log('context', context)
	//event为客户端上传的参数
	let dataList = await collection.where({
		type: event.type
	}).get()
	console.log('dataList : ', dataList)
	//返回数据给客户端
	// dataList.success = true
	return dataList
};
